
import request from "../utils/request";
export default {
    login(data) {
        return request({
            //admin abc+123
            url: '/user/login/web',
            method: 'post',
            data: data
        })
    },
    devicecount() {
        return request({
            url: '/info_board/info_board_device/getcount',
            method: 'get'
        })
    },
    getUserList(data) {
        return request({
            url: '/user/user_manage/getUserPage',
            method: 'post',
            data: data
        })
    },
    resetPWD(id){
        return request({
            url:`/user/user_manage/restartPassword/${id}`,
            method: 'get'
        })
    },
    userAdd(data){
        return request({
            url:'/user/user_manage/add',
            method: 'post',
            data:data
        })
    },
    getRoleList(){
        return request({
            url:'/user/role/getlist',
            method:'post'
        })
    },
    getRoleListByUser(id){
        return request({
            url:`/user/user_manage/getRoleList/${id}`,
            method:'get'
        })
    },
    addUserRole(data){
        return request({
            url:'/user/user_manage/addRole',
            method: 'post',
            data:data
        })
    },
    DelUserRole(data){
        return request({
            url:'/user/user_manage/removeRole',
            method: 'post',
            data:data
        })
    },
    changePSWD(data){
        return request({
            url:'/user/user_manage/updatePassword',
            method:'post',
            data
        })
    },
    getUsermsg(){
        return request({
            url:'/user/user_manage/personInfo',
            method:'get'
        })
    },
    UpdUsermsg(data){
        return request({
            url:'/user/user_manage/update',
            method:'post',
            data
        })
    },
    getDeptList(data){
        return request({
            url:'/user/dept/getPage',
            method:'post',
            data
        })
    },
    delDept(id){
        return request({
            url:`/user/dept/delete/${id}`,
            method:'get'
        })
    },
    getDeptByID(id){
        return request({
            url:`/user/dept/${id}`,
            method:'get'
        })
    },
    updateDept(data){
        return request({
            url:'/user/dept/update',
            method:'post',
            data
        })
    },
    addDept(data){
        return request({
            url:'/user/dept/add',
            method:'post',
            data
        })
    },
    DeptList(){
        return request({
            url:'/user/dept/getList',
            method:'post'
        })
    },
    addUserDept(data){
        return request({
            url:'/user/dept/updateUserDept',
            method:'post',
            data
        })
    },
    ///角色类,huang,2024/11/29
    addMyUserRole(data){
        return request({
            url:'/user/role/add',
            method:'post',
            data
        })
    },
    upMyUser(data){
        return request({
            url:'/user/user_manage/update',
            method:'post',
            data
        })
    },
    upMyUserRole(data){
        return request({
            url:'/user/role/update',
            method:'post',
            data
        })
    },
    delMyUser(id){
        return request({
            url:'/user/user_manage/delete/'+id,
            method:'post'
        })
    }
    ,delMyUserRole(id){
        return request({
            url:'/user/role/delete/'+id,
            method:'post'
        })
    }

}